package com.blog.sys.dao;

import com.blog.sys.entity.SysUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

public interface SysUserRepository extends JpaRepository<SysUser, Integer> {

    SysUser findByUsername(String username);

    boolean existsByUsername(String username);

    @Transactional
    SysUser findSysUserById(int userid);

}